@include("template::My.views.header")  
<link href="/mycms/cms/theme/My/assets/css/login.css?time={{time()}}" rel="stylesheet">
</head>
<body class="bg-[#F4F6FB] font-['PingFang']" >
      <div class="container mx-auto h-60 bg-cover bg-center " style="background-image: url('/mycms/cms/theme/My/assets/img/top.png')">
    </div>
     <form method="post" id="login" action="{{route('user.regnext',['referrer'=>$referrer?:url('/')])}}" onsubmit="return sms();">
     <div class="container mx-auto bg-white w-11/12  rounded-xl h-auto flex flex-col justify-center items-center  -mt-[158px] ">
        <div class="container mx-auto w-[195px]  h-auto  mt-[25px] text-[#222222] mb-[52px]">
           <p class="font-['PingFang']  text-[23px] font-bold text-center " >免费注册</p>
        </div>
        <input type="tel" id="mobile"  name="mobile" class="rounded-full w-[302px]   h-[53px]   bg-[#F6F6F6] text-center text-[#C6C6C6] text-xl  border-[0px] placeholder:text-[#C6C6C6] placeholder:text-[18px] focus:text-[#222222]  focus:text-[18px] mb-[27px] " placeholder="输入手机号"/>
        <input type="hidden" name="from" value="{{$form}}"/>
          @csrf
        <button  class="bg-[#3368FD] rounded-full shadow-xl shadow-blue-400/30 w-[302px]  h-[50px]   text-white font-bold text-[18px] ">下一步</button>
       <p class="text-center text-[14px] text-[#222222] font-medium leading-[16px] mb-[16px] mt-[21px]  ">已有账号 <a href="{{route('user.login',['referrer'=>$referrer?:url('/')] )}}" ><span class="text-[#3368FD]">登陆</span></a></p>
        <div class="text-center text-[12px] text-[#B2B2B2] font-medium leading-[12px] mb-[206px]"><input type="checkbox"  checked class="text-[#3368FD] w-[14px] h-[14px]  rounded-full focus:ring-indigo-400 focus:ring-opacity-25 border border-gray-300 justify-end "  /> 阅读并同意 <span class="font-bold">服务协议</span> 和 <span  class="font-bold">隐私协议</span></div>
        <!--<a href="javascript:sms()" id="send_btn">马上发送</a>-->
    </div>
    </form>
<script>
    function sms(obj)
    {
        var mobile = $('#mobile').val();

        if (mobile.length != 11) {
            alert('手机格式不正确');
            return false;
        }
 

        if (send_lock) {
            return false;
        }
        send_lock = true;

        $.ajax({
            url: '{{user_reg_code_path()}}',
            type: 'post',
            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
            dataType: "json",
            data: {"mobile":mobile},
            timeout: 60000,
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            },
            success: function (res) {
               // alert(res.msg);
               console.log(res);
              //  alert(res.msg);
               // location.href = '{{url('')}}';  
                
            },
            error: function (xhr) {
            //   jsonObj=JSON.parse(xhr.response)
            //   alert(jsonObj.msg);
            //   return false;
            }
        });
        return true;
    }
    var send_lock = false;
  
</script>
@include("template::My.views._footer")